//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.andromeda.androbench2;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class Testing_SQLite_DBHelper extends SQLiteOpenHelper {
    String journalMode;

    public Testing_SQLite_DBHelper(Context var1, int var2, String var3) {
        super(var1, "testing_sqlite.db", (CursorFactory)null, var2);
        this.journalMode = var3;
    }

    public void onConfigure(SQLiteDatabase var1) {
        Cursor var2 = var1.rawQuery("PRAGMA journal_mode=" + this.journalMode, (String[])null);
        var2.moveToNext();
        System.out.println("journal_mode=" + var2.getString(0));
        var2.close();
    }

    public void onCreate(SQLiteDatabase var1) {
        System.out.println("SQLiteOpenHelper onCreate() is called");
        var1.execSQL("DROP TABLE IF EXISTS friends;");
        var1.execSQL("DROP INDEX IF EXISTS friends_index;");
        var1.execSQL("CREATE TABLE friends (  " +
                "_id INTEGER PRIMARY KEY AUTOINCREMENT,  " +
                "contact_id INTEGER," +
                "  id INTEGER, " +
                " type INTEGER NOT NULL,  " +
                "uuid TEXT, " +
                " phone_number TEXT NOT NULL,  " +
                "raw_phone_number TEXT,  name TEXT NOT NULL," +
                "  phonetic_name TEXT,  profile_image_url TEXT,  " +
                "full_profile_image_url TEXT,  " +
                "original_profile_image_url TEXT, " +
                " status_message TEXT, " +
                " chat_id INTEGER NOT NULL, " +
                " brand_new INTEGER NOT NULL, " +
                " blocked INTEGER NOT NULL, " +
                " favorite INTEGER NOT NULL,  " +
                "position INTEGER NOT NULL,  " +
                "v TEXT, " +
                " board_v TEXT, " +
                " ext TEXT, " +
                " nick_name TEXT,  " +
                "user_type INTEGER NOT NULL, " +
                " story_user_id INTEGER, " +
                " account_id INTEGER, " +
                " linked_services TEXT,  " +
                "hidden INTEGER NOT NULL, " +
                " member_type INTEGER DEFAULT 0 NOT NULL, " +
                " involved_chat_ids TEXT,  " +
                "contact_name TEXT,  " +
                "enc INTEGER, " +
                " created_at INTEGER,  " +
                "new_badge_updated_at INTEGER,  " +
                "new_badge_seen_at INTEGER );");
    }

    public void onDowngrade(SQLiteDatabase var1, int var2, int var3) {
        var1.execSQL("drop index if exists friends_index;");
        var1.execSQL("drop table if exists friends;");
        this.onCreate(var1);
    }

    public void onUpgrade(SQLiteDatabase var1, int var2, int var3) {
        var1.execSQL("drop index if exists friends_index;");
        var1.execSQL("drop table if exists friends;");
        this.onCreate(var1);
    }
}
